/*
**      Newton Developer Technical Support Sample Code
**
**      Mini-MetaData, changes from the Mini-MetaData NTJ article.
**
**      by Ryan Robertson, Newton Developer Technical Support
**
**      Copyright  1996 by Apple Computer, Inc.  All rights reserved.
**
**      You may incorporate this sample code into your applications without
**      restriction.  This sample code has been provided "AS IS" and the
**      responsibility for its operation is 100% yours.  You are not
**      permitted to modify and redistribute the source as "DTS Sample Code."
**      If you are going to re-distribute the source, we require that you
**      make it clear in the source that the code was descended from
**      Apple-provided sample code, but that you've made changes.
*/

Since the publication of the Mini-MetaData NTJ article, the correct way to register a format has been changed.

Here is the correct way to register a format:

local registry;
if GlobalVarExists( '|MiniMetaDataRegistry:DTS| ) then
	registry = GetGlobalVar( '|MiniMetaDataRegistry:DTS| );
else
	registry := DefGlobalVar( EnsureInternal('|MiniMetaDatRegistry:DTS|), 
				     		  EnsureInternal('{}) );

registry.( EnsureInternal( myFormatSymbol ) ) := myFormat;


Here is how you would remove your format from the registry:

if GlobalVarExists( '|MiniMetaDataRegistry:DTS| ) then begin
	local registry = GetGlobalVar( '|MiniMetaDataRegistry:DTS| );
	if HasSlot( registry, myFormatSymbol ) then
		RemoveSlot( registry, myFormatSymbol );
end;


The symbol myFormatSymbol is the same symbol found in the symbol slot of your format frame.
